package com.song.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.sql.Timestamp;
import java.util.List;

/**
 * @Author Klys
 * @Date 2022/12/30 1:31
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "article")
public class Article {

    @TableId(value = "id")
    private Long id;

    @TableField(value = "commentCounts")
    private int commentCounts;

    @TableField(value = "createDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp createDate;

    @TableField(value = "summary")
    private String summary;

    @TableField(value = "title")
    private String title;

    @TableField(value = "coverImage")
    private String coverImage;

    @TableField(value = "articleBody")
    private String articleBody;

    @TableField(value = "viewCounts")
    private int viewCounts;

    @TableField(value = "weight")
    private int weight;

    @TableField(value = "authorId")
    private String authorId;

    @TableField(value = "categoryId")
    private int tagId;

    @TableField(value = "articleScore")
    private float articleScore;

    @TableField(exist = false)
    private String tagName;

    @TableField(exist = false)
    private float tagScore;
}
